﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="admin_p_know_list.aspx.cs" Inherits="PM.Web.Admin.admin_p_know_list" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">

.STYLE1 {font-size: 12px}
.STYLE3 {font-size: 12px; font-weight: bold; }
.STYLE4 {
	color: #03515d;
	font-size: 12px;
}

        .style1
        {
            width: 12%;
        }

    </style>

<script src="../Scripts/artDialog.min.js" type="text/javascript"></script>
<script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
<script>

    (function () {
        var d = art.dialog.defaults;
        d.skin = ['aero','default','chrome','facebook'];
        d.drag = true;
        d.showTemp = 100000;
    })();
    
    var highlightcolor = '#c1ebff';
    //此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
    var clickcolor = '#51b2f6';
    function changeto() {
        source = event.srcElement;
        if (source.tagName == "TR" || source.tagName == "TABLE")
            return;
        while (source.tagName != "TD")
            source = source.parentElement;
        source = source.parentElement;
        cs = source.children;
        //alert(cs.length);
        if (cs[1].style.backgroundColor != highlightcolor && source.id != "nc" && cs[1].style.backgroundColor != clickcolor)
            for (i = 0; i < cs.length; i++) {
                cs[i].style.backgroundColor = highlightcolor;
            }
    }

    function changeback() {
        if (event.fromElement.contains(event.toElement) || source.contains(event.toElement) || source.id == "nc")
            return
        if (event.toElement != source && cs[1].style.backgroundColor != clickcolor)
        //source.style.backgroundColor=originalcolor
            for (i = 0; i < cs.length; i++) {
                cs[i].style.backgroundColor = "";
            }
    }

    function clickto() {
        source = event.srcElement;
        if (source.tagName == "TR" || source.tagName == "TABLE")
            return;
        while (source.tagName != "TD")
            source = source.parentElement;
        source = source.parentElement;
        cs = source.children;
        //alert(cs.length);
        if (cs[1].style.backgroundColor != clickcolor && source.id != "nc")
            for (i = 0; i < cs.length; i++) {
                cs[i].style.backgroundColor = clickcolor;
            }
        else
            for (i = 0; i < cs.length; i++) {
                cs[i].style.backgroundColor = "";
            }
        }

        function addNew() {
            art.dialog.open('admin_com_addup.aspx', {
                title: '远程载入HTML片段',
                width: 800,
                height: 300,
                lock:false,
            });
//            art.dialog({
//                lock:true,
//                content:'<a href="#">弹出一个窗口进行内容输入</a>',
//                yesFn:true,
//                noFn:true,
//                window:'top',
//                title:'新增机构'
//            });
        }

        function openDialog(url,title,width,height,islock){
            art.dialog.open(url,{
                title:title,
                width:width,
                height:height,
                lock:islock
            });
        }

        function DelConfirm(id){
            var delUrl = 'admin_p_know_addup.aspx?id='+id+'&action=del';
            art.dialog({
            content:'确认要删除吗?',
            yesFn:function(){
                $.get(delUrl,function(responseText, textStatus, XMLHttpRequest){
                    art.dialog.close();
                    art.dialog.parent.document.getElementById('btnReload').click();
                });
            },
            noFn:true,
            lock:true,
            icon:'alert'
            });
        }
</script>
</head>
<body><form id="form1" runat=server>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    
  <tr>
    <td height="30" background="images/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="30"><img src="images/tab_03.gif" width="12" height="30" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="20%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><div align="center"><img src="images/tb.gif" width="16" height="16" /></div></td>
                <td width="95%" class="STYLE1"><span class="STYLE3">社区活动-> 共有记录：[35]</span></td>
              </tr>
            </table></td>
            <td width="80%"><table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
              <tr>
                <td><table class="STYLE1" width="100%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td >
                      社区机构：<asp:DropDownList ID="ddlComList" 
                            DataTextField="treeName" DataValueField="self_community_code" runat="server" 
                            Height="16px" Width="94px"><asp:ListItem Value="0"></asp:ListItem></asp:DropDownList>
                      &nbsp;&nbsp;&nbsp;&nbsp;
                      &nbsp;&nbsp;
                      <asp:LinkButton ID="lnkQuery"  ToolTip="查询" runat="server" 
                            onclick="lnkQuery_Click"><img style="vertical-align:middle" src="images/search.gif" border="0" />查询</asp:LinkButton>
                      
                    </td>

                    <td style="text-align:right; padding-right:10px"><a href="#" onclick="openDialog('admin_p_know_addup.aspx','新增活动',800,600,true);"><img style="vertical-align:middle" src="images/add.gif" border=0 />新增</a></td>
                  </tr>
                </table></td>
                
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="16"><img src="images/tab_07.gif" width="16" height="30" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="images/tab_12.gif">&nbsp;</td>
        <td>
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6" onmouseover="changeto()"  onmouseout="changeback()">
        <asp:Repeater ID="repp_knowlist" runat="server">
        <HeaderTemplate>
        <tr>
            <td width="10%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">所属社区机构</span></div></td>
            <td width="8%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">活动编号</span></div></td>
            <td width="8%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">策划负责人</span></div></td>
            <td width="8%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">策划时间</span></div></td>
            <td width="8%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">举办方式</span></div></td>
            <td width="22%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">活动名称</span></div></td>
            <td width="5%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">活动规模</span></div></td>
            <td width="15%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">活动目的</span></div></td>
            <td width="15%" height="22" background="images/bg.gif" bgcolor="#FFFFFF" class="STYLE1"><div align="center">基本操作</div></td>
          </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
            
            <td height="20" bgcolor="#FFFFFF"><div align="center" class="STYLE1"> <div align="center"><%# Eval("community_name") %></div></div></td>
            <td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"><%# Eval("ProjNo")%></span></div></td>
            <td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"><%# Eval("ProjName1")%></span></div></td>
            <td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"><%# Eval("ProjDate1")%></span></div></td>
            <td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"><%# Eval("ProjType")%></span></div></td>
            <td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"><%# Eval("Proj_Name")%></span></div></td>
            <td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"><%# Eval("ProjSize")%></span></div></td>
            <td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"><%# Eval("ProjOrder")%></span></div></td>
            <td height="20" bgcolor="#FFFFFF"><div align="center"><span class="STYLE4"><a href="javascript:void(0)" onclick="openDialog('admin_p_know_addup.aspx?id=<%# Eval("Know_Code") %>','修改活动',800,600,true)"><img alt="修改" style="vertical-align:middle;border:0" src="images/edt.gif" width="16" height="16" />修改</a>&nbsp; &nbsp;<a href="javascript:void(0)" onclick="DelConfirm(<%# Eval("Know_Code") %>)"><img style="vertical-align:middle;border:0" src="images/del.gif" width="16" height="16" />删除</a></span></div></td>
          </tr>
        </ItemTemplate>
          
          </asp:Repeater>
        </table></td>
        <td width="8" background="images/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="35" background="images/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="35"><img src="images/tab_18.gif" width="12" height="35" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td class="STYLE4">&nbsp;&nbsp;共有 120 条记录，当前第 1/10 页</td>
            <td><table border="0" align="right" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="40"><img src="images/first.gif" width="37" height="15" /></td>
                  <td width="45"><img src="images/back.gif" width="43" height="15" /></td>
                  <td width="45"><img src="images/next.gif" width="43" height="15" /></td>
                  <td width="40"><img src="images/last.gif" width="37" height="15" /></td>
                  <td width="100"><div align="center"><span class="STYLE1">转到第
                    <input name="textfield" type="text" size="4" style="height:12px; width:20px; border:1px solid #999999;" /> 
                    页 </span></div></td>
                  <td width="40"><img src="images/go.gif" width="37" height="15" /></td>
                </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="16"><img src="images/tab_20.gif" width="16" height="35" /></td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
